{% extends 'base.html' %}
{% block title %}Welcome{% endblock %}

{% block content %}

Hello {{ profile_user.email }}

{% for c in profile_user.constituencies.all %}
 <a href="{% url constituency c.slug %}">{{ c.name }}</a>,
{% endfor %}

{% if form %}
<form action="" method="post">
{{ form.as_p }}
<input type="submit" />
</form>
{% endif %}

<h3>Badges</h3>
<ul>
{% for badge in profile_user.badge_set.all %}
    <li><a href='{% url task slug=badge.task.slug %}'>{{ badge.name }}</a></li>
{% endfor %}
</ul>

{% endblock %}
